package com.my.screenadapter.eventBus.eventBusDemo;

import android.os.Bundle;
import androidx.appcompat.app.AppCompatActivity;
import android.util.Log;
import android.view.View;


import com.my.screenadapter.R;

import java.util.Calendar;

public class EventBusActivity extends AppCompatActivity {
    private static final String TAG = "EventBusActivity";
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_event_bus);
//        EventBus.getDefault().register(this);
    }

    int age = 18;
    public void eventBusPost(View view) {
        new Thread(new Runnable() {
            @Override
            public void run() {
                new Client().post(new UserEvent("asan",++age));
            }
        }).start();

    }

    public void mainPost(View view) {
        Log.i(TAG, "mainPost: "+ Calendar.getInstance().getTime());
    }
}
